package com.xiaoshuidi.cloud.module.member.controller.app.coupon.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xiaoshuidi.cloud.module.member.enums.coupon.CouponTypeEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @author Ivan.Wu
 * @description 优惠券明细
 * @date 2023/3/21 15:33
 */
@Data
public class CouponCustomerVo {

    @Schema(description = "主键")
    private Long id;

    @Schema(description = "优惠券id")
    private Long couponId;

    @Schema(description = "优惠券券码")
    private String couponCode;

    @Schema(description = "优惠类型")
    private Integer couponType;

    @Schema(description = "优惠名称")
    private String couponName;

    @Schema(description = "客户手机号")
    private String userPhone;

    @Schema(description = "租客昵称")
    private String nickName;

    @Schema(description = "关联账单")
    private String relevanceBill;

    @Schema(description = "发放时间")
    private Date createTime;

    @Schema(description = "用券开始时间")
    private Date expirationStartTime;

    @Schema(description = "用券结束时间")
    private Date expirationEndTime;

    @Schema(description = "使用时间")
    private Date usageTime;

    @Schema(description = "使用状态 1待使用 |2 已作废|3已使用|4已过期")
    private Integer usageStatus;

    @Schema(description = "优惠类型 0-立减   1-折扣")
    private Integer preferentialContentType;

    @Schema(description = "实际优惠金额")
    private BigDecimal realityPreferentialAmount;

    @Schema(description = "优惠金额")
    private BigDecimal preferentialAmount;

    @Schema(description = "发券人")
    private String issuerName;

    @Schema(description = "是否锁定")
    private Boolean isLocked;

    @Schema(description = "账单编号")
    private String billNo;

    public String getCouponTypeDesc() {
        return CouponTypeEnum.getDesc(couponType);
    }
}
